package cn.sofwin.day0105.homework;

import java.util.Scanner;

/**
 * 	6人一间宿舍
 * 	每栋楼有100间宿舍
 *
 * 	请输入本届新生人数： 7801
 * 	计算：需要多少间宿舍、多少栋楼？
 */
public class Dormitory {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入新生人数：");
        int studentsNumber = scan.nextInt();
        int rooms = (int) Math.ceil(studentsNumber/6.0);
        int buildings = (int) Math.ceil(rooms/100.0);
        System.out.printf("需要%d间%d栋", rooms, buildings);
    }
}
